import bus from "@/bus";
let data = {
  status: 'pass',
  totalItem: 1,
  pageSize: window.$pageSize,
  currentPage: 1,
  form: {
    data: [],
    storeName: '',
    auditStatus: null,
    addressArr: [],
    areaId: null,
    cityId: null,
    provinceId: null,
    distributorId: null,
    distributorName: '',
    storeId: null,
    storeName: ''
  },
  columns: [{
    title: '门店名称',
    key: 'storeName',
    minWidth: 200,
    align: 'left',
    tooltip: true
  }, {
    title: '联系人',
    key: 'storeContactName',
    align: 'left',
    minWidth: 150
  }, {
    title: '联系手机',
    key: 'storePhone',
    align: 'left',
    minWidth: 150
  }, {
    title: '门店类型',
    key: 'storeTypeName',
    minWidth: 100,
    align: 'left'
  }, {
    title: '上级经销商',
    key: 'distributorName',
    minWidth: 200,
    tooltip: true
  }, {
    title: '返利奖惩',
    key: 'rebate',
    minWidth: 100,
    align: 'right'
  }, {
    title: '奖惩备注',
    key: 'rewardRemark',
    align: 'left',
    minWidth: 180
  }, {
    title: '审核时返利',
    key: 'storeRebate',
    align: 'right',
    minWidth: 120
  }, {
    title: '审核状态',
    key: 'auditStatusMeaning',
    align: 'left',
    minWidth: 200,
    render: (h, params) => { // 审核不通过时要把原因展示出来
      if (params.row.auditStatus === 2) {
        return h('div', [
          h('span', params.row.auditStatusMeaning),
          h('span', {
            class: 'font-blue'
          }, '(' + params.row.auditRemark + ')')
        ])
      } else {
        if (params.row.auditRemark && params.row.auditStatus !== 0) { // 待审核状态不展示原因
          return h('div', [
            h('span', params.row.auditStatusMeaning),
            h('span', {
              class: 'font-blue'
            }, '(' + params.row.auditRemark + ')')
          ])
        } else {
          return h('div', params.row.auditStatusMeaning)
        }
      }
    }
  }, {
    title: '审核时间',
    key: 'auditDate',
    align: 'left',
    minWidth: 200
  }, {
    title: '发放人',
    key: 'operatorName',
    align: 'left',
    minWidth: 150
  }, {
    title: '审核人',
    key: 'auditOperateName',
    align: 'left',
    minWidth: 150
  }],
  data: []
}
export default data;
